import request from '@/utils/request'

// 仓库管理

// 列表渲染接口
export const Warehouse = (params) => request.get('/api/warehouse/page', { params })

// 删除仓库
export const Delete = (id) => request.delete(`/api/warehouse/?ids[]=${id}`)

// 仓库编码接口
export const CK = (data) => request.get('/api/codeFactory/next/CK', data)

// 修改状态接口
export const AreaChange = (data) => request.put('/api/warehouse', data)

// 新增接口
export const Update = (data) => request.post('/api/warehouse', data)

// 编辑接口
export const Edit = (id) => request.get(`/api/warehouse/${id}`)

// 库区管理
export const Areahouse = (params) => request.get('/api/area/pageDetail', { params })

// 库区管理 删除接口
export const DeleteArea = (id) => request.delete(`api/area/?ids[]=${id}`)

// 库区编号接口
export const KQ = (data) => request.get('/api/codeFactory/next/KQ', data)
// 库区所属仓库接口
export const Status = (params) => request.get('/api/warehouse/list', { params })
// 库区新增接口
export const areaUpdate = (data) => request.post('api/area', data)
// 库区编辑接口
export const areaEdit = (id) => request.get(`/api/area/${id}`)
// 库区修改接口
export const areaChange = (data) => request.put('/api/area', data)
// 库位管理
export const Locationhouse = (params) => request.get('/api/location/pageDetail', { params })

// 库位管理 修改状态接口
export const LocationChange = (data) => request.put('/api/location', data)
